@echo off
for /F %%i in ('dir /b *.pcc') do (
    echo %1 %%i
    call :compile %1 %%i
)
for /F %%i in ('dir /b *.py') do (
    echo %1 %%i
    call :compile %1 %%i
)

goto :end
:getFilesize
    set filesize=%~z1
    exit /b

:compile
    set name=%2
    set n=%name:~0, -4%
    %1 %2 1>%n%.out.txt 2>%n%.warning.txt
    call :getFilesize %n%.warning.txt
    if %errorlevel% == 0 (
        echo "    del %n%.warning.txt"
        del %n%.warning.txt
    )
    exit /b 0 
:end
